package com.yida.gwj.expend.service;

import com.yida.gwj.api.domain.GwjConfFlow;
import com.yida.gwj.api.domain.GwjFinanceAccountDetail;
import com.yida.gwj.api.domain.GwjFinanceAccountMain;
import com.yida.gwj.api.domain.request.RemoteGwjFinanceAccountDetailRequest;
import com.yida.gwj.api.domain.request.RemoteGwjFinanceAccountMainRequest;
import com.yida.gwj.common.enums.GwjBusinessFlagType;
import com.yida.gwj.expend.domain.GwjMaintenanceFundsBusinessHouse;
import com.yida.gwj.expend.domain.dto.*;
import com.yida.gwj.expend.domain.request.*;
import com.yida.gwj.expend.enums.BusinessAttachmentServerTypeEnum;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

import java.util.List;

/**
 * 公维金维修资金业务Service接口
 *
 * @author lgp
 * @date 2023-03-09
 */
@EnableAspectJAutoProxy(exposeProxy = true)
public interface IGwjMaintenanceFundsBusinessAppropriateService {

    /**
     * 查询公维金维修资金业务列表
     *
     * @param maintenanceFundsBusinessListRequest 公维金维修资金业务
     * @return 公维金维修资金业务集合
     */
    List<GwjMaintenanceFundsBusinessListDTO> getGwjMaintenanceFundsBusinessList(GwjMaintenanceFundsBusinessListRequest maintenanceFundsBusinessListRequest);

    /**
     * 查询公维金维修资金业务
     *
     * @param businessId 公维金维修资金业务主键
     * @return 公维金维修资金业务
     */
    GwjMaintenanceFundsBusinessGetInfoDTO getInfoDetails(Long businessId);

    /**
     * 根据flowId查询业务流程
     *
     * @param flowId 业务流程主键
     * @return 业务流程
     */
    GwjConfFlow selectGwjConfFlowByFlowId(Long flowId);

    /**
     * 取件
     *
     * @param businessProcessRequest
     * @return int
     */
    int takeParts(BusinessProcessRequest businessProcessRequest);

    /**
     * 退件
     *
     * @param businessProcessRequest
     * @return int
     */
    int preAcceptRetreat(BusinessProcessRequest businessProcessRequest);

    /**
     * 分摊金额-已选择
     *
     * @param allocatedAmountRequest
     * @return AllocatedAmountSelectDTO
     */
    AllocatedAmountSelectDTO allocatedAmountSelect(AllocatedAmountRequest allocatedAmountRequest);

    /**
     * 使用申请-资金分摊-未选中列表
     *
     * @param allocatedAmountRequest 请求
     * @return 公维金维修资金业务
     */
    List<GwjMaintenanceFundsBusinessHouse> allocatedAmountCancelList(AllocatedAmountRequest allocatedAmountRequest);


    /**
     * 预受理附件审核
     *
     * @param businessId
     * @return int
     */
    int preAcceptExamine(Long businessId);

    /**
     * 获取步骤按钮权限信息
     *
     * @return 查询业务基础信息
     */
    StepConfigInfoDTO getStepConfigInfo(GwjBusinessFlagType... businessFlagType);

    /**
     * 确认受理
     *
     * @param submitRequest 确认受理
     * @return int
     */
    int confirmAcceptance(SubmitRequest submitRequest);

    /**
     * 提交
     *
     * @param submitRequest 第一次检查
     * @return int
     */
    int submit(SubmitRequest submitRequest);

    /**
     * 确认收件
     *
     * @param confirmReceipt 公维金维修资金业务
     * @return int
     */
    int confirmReceipt(ConfirmReceiptDTO confirmReceipt);

    /**
     * 生成财务流水
     *
     * @param bizId 业务标识
     * @return {@link Application4ApprovalDTO}
     */
    int generateFinancialJournal(Long bizId);

    /**
     * 获取总账流水
     *
     * @param mainRequest 主要要求
     * @return {@link List}<{@link GwjFinanceAccountMain}>
     */
    List<GwjFinanceAccountMain> selectGwjFinanceAccountMainList(RemoteGwjFinanceAccountMainRequest mainRequest);

    /**
     * 获取验收报告
     *
     * @param bizId 业务标识
     * @return {@link AcceptanceReportDTO}
     */
    AcceptanceReportDTO getAcceptanceReport(Long bizId);

    /**
     * 获取申请拨付报告
     *
     * @param bizId 业务标识
     * @return {@link ApplyAppropriateReportDTO}
     */
    ApplyAppropriateReportDTO getApplyAppropriateReport(Long bizId);

    /**
     * 查询决算费用分摊清册
     *
     * @param bizId                            业务标识
     * @param businessAttachmentServerTypeEnum 业务附件服务器枚举类型
     * @return int
     */
    TotalCostShareListDTO costList(Long bizId, BusinessAttachmentServerTypeEnum businessAttachmentServerTypeEnum);

    /**
     * 查询分账列表
     *
     * @param detailRequest 分账查询参数
     * @return
     */
    List<GwjFinanceAccountDetail> selectGwjFinanceAccountDetailList(RemoteGwjFinanceAccountDetailRequest detailRequest);

    /**
     * 一次性告知单
     *
     * @param businessId 业务标识
     * @return int
     */
    OneTimeNotificationDTO oneTimeNotification(Long businessId);

    /**
     * 查看申请报批
     *
     * @param bizId 业务标识
     * @return {@link Application4ApprovalDTO}
     */
    Application4ApprovalDTO getApplication4Approval(Long bizId);

    /**
     * 获取使用拨付申请表
     *
     * @param bizId 业务标识
     * @return {@link Application4ApprovalDTO}
     */
    Appropriate4ApproveDTO getAppropriate4Approval(Long bizId);

    /**
     * 取消收件
     *
     * @param attachmentId
     * @return int
     */
    int cancelReceipt(Long attachmentId);

    /**
     * 导出房屋数据
     *
     * @param allocatedAmountRequest
     * @return 楼栋下房屋信息
     */
    List<AllocatedAmountListDTO> exportHouseList(AllocatedAmountRequest allocatedAmountRequest);

    /**
     * 回退
     *
     * @param submitRequest 业务标识
     * @return int
     */
    int fallback(SubmitRequest submitRequest);

    /**
     * 编辑表单
     *
     * @param editFormRequest
     * @return int
     */
    int editForm(EditFormRequest editFormRequest);
    
    //-------------------------------------------新增功能 20230711 hmh start-----------------------------------------------------
    /**
     * 财务对账
     * @param submitRequest 提交请求类
     * @return
     */
    Boolean financeCheck(SubmitRequest submitRequest);
    
    /**
     * 案例办结操作
     * @param submitRequest 提交请求类
     * @return
     */
    Boolean businessFinish(SubmitRequest submitRequest);
    //-------------------------------------------新增功能 20230711 hmh end-----------------------------------------------------
    
}
